<template>
  <div class="contaier">
    <el-button type="primary" @click="handleBack">按钮</el-button>
    <el-dialog
      title="提示"
      :visible.sync="dialogVisible"
      width="30%"
      :before-close="handleClose"
    >
      <span>这是一段信息</span>
      <template #footer>
        <p class="dialog-footer">
          <el-button @click="dialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="dialogVisible = false"
            >确 定</el-button>
        </p>
      </template>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "app",
  data() {
    return {
      dialogVisible: false,
    };
  },
  methods: {
    handleBack() {
      this.dialogVisible = true;
    },
  },
};
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
